home *** CD-ROM | disk | FTP | other *** search
/ Cream of the Crop 21 / Cream of the Crop 21 (Terry Blount) (October 1996).iso / bbs / tmg105b2.zip / EXTERNAL.DOC < prev    next >
Text File  |  1996-08-03  |  24KB  |  427 lines

  1.   EXTERNAL.DOC                                                      Page  1
  2.   ╒═════════════════════════════════════════════════════════════════════════╕
  3.   │             The Magic Gate version 1.05                                 │
  4.   │             Documentation  August '96                                   │
  5.   │             (C) Copyright 1995, 1996  All Rights Reserved               │
  6.   │               Joseph O'Connor                                           │
  7.   ╘═════════════════════════════════════════════════════════════════════════╛
  8.  
  9.         This game may be distributed in its original, unmodified form as
  10.   long as no money is made off of it.  Please do not include the contents
  11.   of this archive in any CD, collection, or whatever without express written
  12.   permission of ME!
  13.  
  14.   This file was written for all you code-heads out there who are interested
  15.   in writing an external module for TMG.  This will document all the
  16.   structures for the various things in TMG as well as giving insight into how
  17.   to put new EXMODS into the game.  If you're a code-junkie like me, and want
  18.   to write your own thing for everything, then this is the file you need to
  19.   get started.
  20.  
  21.  
  22.   ─═════════════════════════════════════════════════════════════════════════─
  23.   Introduction:
  24.  
  25.   If the TMGSL is not powerful enough for you, or you need to do something
  26.   totally different in your EXMOD, you should have the ammunition you need
  27.   to get writing the code after reading this file.  You will learn the format
  28.   of the drop file as well as the method for adding your EXMOD to the
  29.   EXMODS.DAT file as well (which is just as useful for scripts).  Even if you
  30.   don't plan on writing an EXMOD, this file will contain some techie stuff
  31.   you might be interested in.
  32.  
  33.   EXTERNAL.DOC                                                      Page  2
  34.   ─═════════════════════════════════════════════════════════════════════════─
  35.   Constants in the game:
  36.  
  37.   Oh geez, there are about a million constants in this program.  Mainly
  38.   because its so much easier to remember CLASS_MAGE then it is to remember if
  39.   mages were 2 or 8.  Not all of these will apply 100% to each and every
  40.   EXMOD, but some of them will be vital to understanding the values of some
  41.   of the fields.
  42.   
  43.   Go figure, well, anyway, here is a list of constants that relate to file 
  44.   names.
  45.  
  46.   CHAR_FILE='PLAYERS.DAT';         This file has all the player data
  47.   GUILD_FILE='GUILDS.DAT';         This file has all the guilds data
  48.   STAT_FILE='MAGISTAT.DAT';        This contains the configuration for the
  49.                                    game, such things as costs etc.
  50.   MENU_TEXT_FILE='MAGITEXT.DAT';   This has all the menus and unchanging text
  51.   HOLD_FILE='HOLD.DAT';            This is used to tell any running copies not
  52.                                    to access the disk drive temporarily
  53.   WEAPON_FILE='WEAPONS.DAT';       This file contains data for all the weapons
  54.   ARMOR_FILE='ARMORS.DAT';         This file contains data for all the armors
  55.   SHIELD_FILE='SHIELDS.DAT';       This file contains data for all the shields
  56.  
  57.   GRANK_ANS_FILE='GRANK.ANS';      This file contains the ANSI guild ranks
  58.   GRANK_ASC_FILE='GRANK.ASC';      This file contains the ASCII guild ranks
  59.   PRANK_ANS_FILE='PRANK.ANS';      This file contains the ANSI player ranks
  60.   PRANK_ASC_FILE='PRANK.ASC';      This file contains the ASCII player ranks
  61.  
  62.   These constants should be used for any call to open, close, read whatever
  63.   it is you want to do to the file cause it will make your life a lot easier
  64.   if I ever decide to change a file name ;)
  65.   Alright, moving along, next we have all the possible flags that can affect
  66.   the character and are stored in the main_char^.char_flags long integer.
  67.   These determine the actions that the character has performed and determine
  68.   which cans can still be performed if the oppurtunity arises.
  69.   
  70.   FLAGS_SHAMED_MASTER=1;        This flag is set if the character attacks
  71.                                 another character with the same master.
  72.   FLAGS_MASTER_IGNORES=2;       This flag is set if the master will not do
  73.                                 anything for the character today.
  74.   FLAGS_EXPERT_MODE=4;          Are menus shown to the player?
  75.   FLAGS_LOUIS_THWARTED=8;       Louis has stopped the character from trying
  76.                                 to break into the inn.  All further attempts
  77.                                 are automatic failures that day.
  78.   FLAGS_FOUND_GATE=16;          Have they found the magic gate that day?
  79.   FLAGS_ENTERED_GATE=32;        Did they enter the gate that day?
  80.   FLAGS_HAS_BOW=64;             Does the character have a bow and arrow?
  81.   FLAGS_HUNTED=128;             Has a hit been put out on this character?
  82.   FLAGS_SEEN_SHADY=256;         Have they seens Shady today?
  83.   FLAGS_CHAR_DRUNK=512;         Did the character have one too many in the bar?
  84.   FLAGS_MET_TRAVELLER=1024;     Have they visited the Sage today?
  85.   FLAGS_DAILY_SECRET_1=2048;    Secret little things...
  86.   FLAGS_DAILY_SECRET_2=4096;    Secret little things...
  87.   FLAGS_DAILY_SECRET_3=8192;    Secret little things...
  88.   FLAGS_DAILY_SECRET_4=16384;   Secret little things...
  89.  
  90.   EXTERNAL.DOC                                                      Page  3
  91.   ─═════════════════════════════════════════════════════════════════════════─
  92.   Default values:
  93.  
  94.   The following are only used if there is no STAT_FILE.  They are the defaults
  95.   that will be written to the stat file.  They're just sort of here for you
  96.   to look at.
  97.  
  98.   DEFAULT_GRACE=15;             
  99.   DEFAULT_RESURRECT=2;
  100.   DEFAULT_FIGHTS=25;
  101.   DEFAULT_PFIGHTS=3;
  102.   DEFAULT_MTRANSFER=10000;
  103.   DEFAULT_NTRANSFER=3;
  104.   DEFAULT_ATRANSFER=TRUE;
  105.   DEFAULT_BANK_RATE=6.00;
  106.   DEFAULT_HEAL_COST=4;
  107.   DEFAULT_INN_COST=300;
  108.   DEFAULT_DEATH_LOSE_EXP=10;
  109.   DEFAULT_MOB_GOLD_MULT=1.20;
  110.   DEFAULT_MOB_EXP_MULT=0.85;
  111.   DEFAULT_MAX_GUILDS=5;
  112.  
  113.   ─═════════════════════════════════════════════════════════════════════════─
  114.   Deciphering the Class variable:
  115.  
  116.   The next group of constants show the bits that correspond to each of the
  117.   six classes as they are in the main_char^.class integer.  They are vital
  118.   to knowing what the characters capabilities are.
  119.  
  120.   CLASS_WARRIOR     =  1;
  121.   CLASS_MAGE        =  2;
  122.   CLASS_THIEF       =  4;
  123.   CLASS_HEALER      =  8;
  124.   CLASS_RANGER      =  16;  <--+-These two were reversed in previous versions.
  125.   CLASS_PALADIN     =  32;   <-+
  126.   
  127.   MASTERED_WARRIOR  =  64;
  128.   MASTERED_MAGE     =  128;
  129.   MASTERED_THIEF    =  256;
  130.   MASTERED_HEALER   =  512;
  131.   MASTERED_RANGER   =  1024;<--+-These two were reversed in previous versions.
  132.   MASTERED_PALADIN  =  2048; <-+
  133.  
  134.   EXTERNAL.DOC                                                      Page  4
  135.   ─═════════════════════════════════════════════════════════════════════════─
  136.   Limits in TMG:
  137.  
  138.   The following constants are used in my records to limit the number of chars
  139.   in the field, so I gave them all names that are easy to remember.
  140.  
  141.   SHORT_LENGTH=20;
  142.   MED_LENGTH=40;
  143.   MAX_LENGTH=86;
  144.   DESC_LENGTH=100;
  145.   
  146.   The next few constants are limits on the game as far as what would unbalance
  147.   it.  These numbers have been toyed and tinkered with from the start and they
  148.   are just about right for most any game now.
  149.  
  150.   MAX_WEAPONS=14;               Number of different ARMORS,WEAPONS and SHIELDS
  151.   MAX_LEVELS=20;                Total number of levels in the game.
  152.   MAX_DAMAGE_REDUCTION=87;      How little damage can you possibly deflect?
  153.   MAX_LUCK=30;                  Luck modifies quite a few things, and the
  154.                                 higher it goes, the easier it is to do well.
  155.   MOB_CATCH_CHANCE=20;          {MBL} Determines at what percentage a monster
  156.                                 will attack you when you try to flee from it.
  157.   BONUS_HIT_CHANCE=8;           {MBL} How often do you or the mob strike for
  158.                                 extra damage?
  159.   SKILL_GAIN_LEVEL=5;           The number of percentage points you gain when
  160.                                 you raise a level in your class.